<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>首页图文管理-添加文档</title>
<link href="public/admin.css" type="text/css" rel="stylesheet" />

</head>

<body>
<div class="admin_content">
<div class="admin_title">
    	<h3>首页图文管理-添加文档</h3>
</div>
   <form action="add_article.php" enctype="multipart/form-data" method="post" class="form">

   		<label for="index_title">文章标题：</label><input type="text" name="title" id="index_title" class="form-control" /><br />
       <label for="channel">所属栏目：</label>
       <div >
           <select class="chennel" name="channel" id="channel">
               <option value="0">请选择</option>
               <option value="1">装修前</option>
               <option value="2">装修中</option>
               <option value="3">装修后</option>
           </select>
           <select class="cat" name="cat" id="cat">
               <option value="0">请选择</option>
           </select>
       </div>
       <br />
        <label>文章作者：</label><input type="text" name="author" class="form-control" /><br />
        <label>文章摘要：</label><br />
        <textarea name="describ" rows="5" cols="80" class="form-control"></textarea><br />
        <label>缩略图：</label>
        <div id="imgdiv"><img id="ImgPr" width="120" height="90" alt="请上传图片" /></div>
		<input type="file" id="up" name="litpic" class="form-control" />
<br />
        <label>文章内容：</label><br />
        
        <script id="htmlcontainer" name="content" type="text/plain">
		在这里写你的初始化内容
	</script>
	
    <script type="text/javascript" src="../uetest/ueditor.config.js" ></script>
    <script type="text/javascript" src="../uetest/ueditor.all.js"></script>
    <script type="text/javascript">
		var ue = UE.getEditor('htmlcontainer',{
				initialFrameHeight:500
							  });
		
	</script>
   	
    <button  type="submit">提交文档</button>
   
   </form>
   </div><script src="public/jquery.js" type="text/javascript" language="javascript"></script>
<script src="public/imgupload_preview.js" type="text/javascript" language="javascript"></script>
<script>
    var channel=[[],['收房','设计','预算','合同'],['拆改','水电','防水','泥瓦','木工','游戏','竣工'],['软装','入住']];
    $(function () {
        $("#up").uploadPreview({ Img: "ImgPr", Width: 120, Height: 120 });
        $("#channel").change(function(){
            var v = $("#channel").val();
            var htmlc="";
            htmlc+='<option value="0">请选择</option>';
           for(i=0;i<channel[v].length;i++){
               j=i+1;
               htmlc+= '<option value="'+j+'">'+channel[v][i]+'</option>';;
           }
            $("#cat").html(htmlc);
        });
    });
</script>
</body>
</html>
